<?php

class sns_interface
{
	static function send_sns($phone_number, $content, &$err = null)
	{
		if (empty($phone_number) || empty($content))
		{
			$err = "params error";
			return  false;
		}
		
		$par = array("mayan1104", "12345678", $phone_number, $content);
		for($i=0; $i<count($par); $i++)
		{
		        $par[$i] = urlencode($par[$i]);
		}
		$zh = $par[0];
		$mm = $par[1];
		$hm = $par[2];
		$nr = $par[3];
		$url = "http://86786403.duanxinpt.com/smsComputer/smsComputersend.asp?zh=$zh&mm=$mm&hm=$hm&nr=$nr&dxlbid=3";
		echo "test send_sns url=[$url]";
		$ret = file_get_contents($url);
		
		return $ret;
	}
	
}

?>